﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<nelech.Models.DBModel.Munach>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%= Model.name %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2><%= Html.Encode(Model.name) %></h2>
  <div id="left">
        <div class="gallerycontainer">
            <% 
  var en = Model.Image.OrderBy(p => p.id).GetEnumerator(); 
               for (var i = 0; i < 2; i++)
               {
                   if (!en.MoveNext())
                       break;

                   var image = en.Current;
                   var smallImageName = System.IO.Path.GetFileName(image.path.Replace("\\", "/"));
            %>
            <a class="thumbnail" href="#thumb">
                <img src="<%= "/Upload/Thumbs/" + smallImageName %>" alt="<%= image.text %>" width="150px" /><br />
                <span>
                    <img src="<%= image.path %>" alt="<%= image.text %>" width="400px" />
                    <br />
                    <%=image.text%></span></a>
            <%=image.text%>
            <%
                }
            %>
        </div>
       
  <%Html.RenderAction("AdvertShow", "Advert", new { id = 7 });%>
   <%Html.RenderAction("AdvertShow", "Advert", new { id = 7 });%>
</div>

  
    <div id="main">
    <%= Model.description %></div>
  
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="publishTop" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="Right" runat="server">
</asp:Content>

